<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\library\Ems;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }
    
     /**
     * 发送验证码
     * @return bool
     */
    public function emsSend( $email)
    {
        // $email = $this->request->get('email');
        // $email = $this->request->post('email');
        $result = Ems::send($email);
        return json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
    }
}
